package com.sleep.satokendemo.entry;

/**
 * @author GuoAo
 * @enumName ResultEnum
 * @date 2025/3/12
 * @description TODO
 */
public enum ResultEnum {
    SUCCESS(200,"成功"),
    FAIL(400,"失败"),
    ERROR(500,"错误"),
    ;

    private Integer code;
    private String msg;

    ResultEnum(Integer code, String msg) {
        this.code = code;
        this.msg = msg;
    }

    public Integer getCode() {
        return code;
    }

    public String getMsg() {
        return msg;
    }

    public static Integer getValue(ResultEnum type){
        return type.getCode();
    }
}
